package com.restaurant.springboot.service;

import com.restaurant.springboot.entity.UserEntity;
import org.springframework.transaction.annotation.Transactional;

import java.beans.Transient;

public interface UserService {

    UserEntity getUser(String openId);

    boolean userIsExit(String openId);

    @Transient
    boolean updateUser(UserEntity user);

    UserEntity getUserById(int id);

    @Transactional(rollbackFor = Exception.class)
    boolean registerUser(String code,String nickName,String url);

    String getOpenId(String code);
}
